package com.junzhiit.nengji.dao.impl;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.bainaeco.framework.base.dao.AbstractBaseDAO;
import com.bainaeco.framework.common.jdbc.StatementParameter;
import com.junzhiit.nengji.dao.ShopChainGoodsDAO;
import com.junzhiit.nengji.model.ShopChainGoods;

@Repository
public class ShopChainGoodsDAOImpl extends AbstractBaseDAO<ShopChainGoods> implements ShopChainGoodsDAO{
	
	@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
	@Override
	public boolean deleteByGoodsId(String goodsId){
		StringBuffer sql=new StringBuffer();
		sql.append("delete from shop_chain_goods where goods_id=?");
		
		StatementParameter param=new StatementParameter();
		param.setString(goodsId);
		
		return super.updateForBoolean(sql.toString(), param);
		
	}
}
